package com.lan.model;

import com.lan.model.symbol.Scope;
import org.antlr.v4.runtime.ParserRuleContext;

public abstract class Symbol {

    protected String id;

    //符号的名称
    protected String name;

    //所属作用域
    protected Scope scope;

    //Symbol关联的AST节点
    protected ParserRuleContext ctx;

    public void setScope(Scope scope) {
        this.scope = scope;
    }

    public String getName() {
        return name;
    }

    public String getId() {
        return id;
    }

    public Scope getScope() {
        return scope;
    }

    public ParserRuleContext getCtx() {
        return ctx;
    }

    public void setCtx(ParserRuleContext ctx) {
        this.ctx = ctx;
    }
}